/**
 * ...
 * @author Krzysztof Rozalski
 */

package hapi.db;
#if php
import php.db.Connection;
import php.db.ResultSet;
#end

class MysqlConnectionWrapper  implements Connection {

	var conn:Connection;
	
	public function new(conn:Connection) {
		this.conn = conn;
	}
	public function addValue( s : StringBuf, v : Dynamic ):Void {
		conn.addValue(s, v);
	}
	public function request( s : String ):ResultSet {
		return new MysqlHapiResultSet(conn.request(s));
	}
	public function close():Void {
		return conn.close();
	}
	public function escape( s : String ):String {
		return conn.escape(s);
	}
	public function quote( s : String ):String {
		return conn.quote(s);
	}
	public function lastInsertId():Int {
		return conn.lastInsertId();
	}
	public function dbName():String {
		return conn.dbName();
	}
	public function startTransaction():Void {
		conn.startTransaction();
	}
	public function commit():Void {
		conn.commit();
	}
	public function rollback():Void {
		conn.rollback();
	}
}